<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>各种图形</title>
  <style>
    .trapezoid {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 160px;
      padding: 60px;
      text-align: center;
      color: white;
      font-size: 200%;
    }

    /*关键部分：让文字在容器中显示，伪元素来做图案，不管怎么旋转变化，都不会对文字产生影响*/
    .trapezoid:before {
      content: "";
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      /* 实现梯形的关键属性 */
      transform: perspective(40px) scaleY(1.3) rotateX(5deg);
      transform-origin: bottom;
      background: deeppink;
      z-index: -1;
    }
  </style>
</head>

<body>
  <div class="trapezoid">一个梯形</div>

  更多的单标签实现图案：http://chokcoco.github.io/magicCss/html/index.html
</body>

</html>